Skip to main content

Cancel Order


DELETE /api/integrator/order/cancel

This DELETE method is used to cancel an order in the Keepz system.

⚠️ Important restriction:

An order can only be canceled if:

  • No payment attempt has been made yet (status = INITIAL), OR

  • A payment attempt has been started but is still in progress (status = PROCESSING).

Once an order reaches a final state it can no longer be canceled.

Request details

When sending request to Keepz, these four parameters must always be included in the query parameters:

identifier

  • Unique ID of the integrator in the Keepz system.
  • Provided by Keepz during the integration process.

encryptedData

  • Contains the actual request payload encrypted using a randomly generated symmetric key and IV (Initialization Vector).

encryptedKeys

  • Contains the AES key and IV used to encrypt encryptedData.

aes

  • Boolean flag indicating that the request uses AES-based symmetric encryption (needed for backward compatibility with older encryption methods).

For details on the encryption process, see the Encryption Guide documentation.

Parameters

The following parameters form the actual cancel payload. They must be included inside the encryptedData parameter, which is encrypted and passed in the request as shown above.

ParameterTypeRequiredDescriptionPossible valuesNote
integratorIdstring (UUID v4 format)Unique ID of the integrator in the Keepz system. Provided to the integrator by a Keepz representative.
integratorOrderIdstring (UUID v4 format)Unique ID of order in the integrator’s system.

Response details

✅ Success Response

If the request is valid, the API returns an encrypted payload:

{
"encryptedData": "string",
"encryptedKeys": "string",
"aes": true
}

encryptedData

  • Contains the actual response payload encrypted using a randomly generated symmetric key and IV (Initialization Vector).

encryptedKeys

  • Contains the AES key and IV used to encrypt encryptedData.

aes

  • Boolean flag indicating that the request uses AES-based symmetric encryption (needed for backward compatibility with older encryption methods).

For details on the decryption process, see the Encryption Guide documentation.

Inside encryptedData, the following parameters are available after decryption:

ParameterTypePossible Values / FormatDescription
integratorOrderIdstring(UUID v4)Unique identifier of the order in the integrator’s system.
statusstringCANCELEDCurrent status of the order in Keepz system.

❌ Error Response

If an error occurs, the response is returned without encryption (plain JSON):

{
"message": "Order not found or already finalised and can't be canceled",
"statusCode": 6006,
"exceptionGroup": 2
}
ParameterTypeDescription
messagestringError message. Details are provided in the dedicated section below.
statusCodenumberError status code. Details are provided in the dedicated section below.
exceptionGroupnumberError group. Details are provided in the dedicated section below.

Details can be found at Error Code Description.